package com.jvyou.driver.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jvyou.driver.domain.entity.User;
import com.jvyou.driver.domain.vo.PageVo;
import com.jvyou.driver.mapper.UserMapper;
import com.jvyou.driver.service.UserService;
import org.springframework.stereotype.Service;

/**
 * (User)表服务实现类
 *
 * @author 橘柚
 * @since 2024-08-12 10:13:05
 */
@Service("userService")
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Override
    public PageVo pageUser (int pageNum, int pageSize) {
        Page<User> page = new Page<>(pageNum, pageSize);
        page(page);
        return new PageVo(page.getRecords(), page.getTotal());
    }
}
